<?php
// $data = $_POST;
$curl = curl_init();

$header[] = "X-Requested-With: XMLHttpRequest";


curl_setopt_array($curl, array(
  CURLOPT_URL => "http://www.wxeditor.com/getMaterialByLabel",
    CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));
$data = array('id'=>34,'page'=>1 );
curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求
curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);


$arr['data'] = json_decode($response,true);
$arr['code'] = 1;


echo json_encode($arr);


?>